package com.kai.service.data.request.article;

import com.kai.service.enums.ArticleOperateTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@Schema(description = "文章操作请求参数")
public class ArticleOperatorRequest implements Serializable {

    private static final long serialVersionUID = 544959463990431024L;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空")
    @Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED)
    Long userId;

    /**
     * 文章id
     */
    @NotNull(message = "文章id不能为空")
    @Schema(description = "文章id", requiredMode = Schema.RequiredMode.REQUIRED)
    Long articleId;

    /**
     * 操作类型
     */
    @NotNull(message = "操作类型不能为空")
    @Schema(description = "操作类型", requiredMode = Schema.RequiredMode.REQUIRED)
    ArticleOperateTypeEnum operateType;

    /**
     * 操作时间
     */
    @Schema(description = "操作时间")
    Date createDatetime = new Date();
}
